package cn.com.twoke.game.common.constants;

import cn.com.twoke.game.common.entity.message.*;

public enum MessageType {
    CONNECT(1, Message.class),
    LOGIN(2, LoginMessage.class),
    LOGOUT(3, LogoutMessage.class),
    UPDATE_ONLINE_USER(4, UpdateOnlineUserMessage.class),
    INVITE_JOIN_GAME(5, InviteJoinGameMessage.class),
    START_GAME(6, StartGameMessage.class),
    GAME_CHAT(7, GameChatMessage.class),
    GAME_DATA(8, GameDataMessage.class),
    STOP_GAME(9, StopGameMessage.class),
    ;

    private final Integer type;
    private final Class<? extends Message>  clazz;

    MessageType(Integer type, Class<? extends Message> clazz) {
        this.type = type;
        this.clazz = clazz;
    }

    public Integer getType() {
        return type;
    }

    public Class<? extends Message> getClazz() {
        return clazz;
    }
}
